package com.zztt.logmask.logback;

import ch.qos.logback.classic.pattern.MessageConverter;
import ch.qos.logback.classic.spi.ILoggingEvent;
import com.zztt.logmask.common.ConfigConst;
import com.zztt.logmask.common.utils.MaskHandleUtils;

/**
 * 自定义 message转换器
 */
public class CupdataZiconMessageConverter extends MessageConverter {
    @Override
    public String convert(ILoggingEvent event) {
        String message = super.convert(event);
        String level = event.getLevel().toString();
        return MaskHandleUtils.maskHandleMessage(ConfigConst.MASK_SWITCH,level,message);
    }
}
